<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@taglib uri="estateTag" prefix="estateTag" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	Date date = new Date();
	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	String nowTime = sdf.format(date);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>拼购管理系统</title>
<script type="text/javascript" src="resource/js/jquery-1.4.2.js"></script>
</head>
<body>
	<center><jsp:include page="index/top.jsp"></jsp:include>
	<estateTag:menuTag2/>
	<c:if test='${sessionScope.userinfo.type == "6"||sessionScope.userinfo.type == "7"}'>
	<div id="funcArea" class="funcArea" align="left"><h3 style="color:#8E1F02">信息提醒：</h3>
	<span class="tip">如果您想添加更多的品牌资料，请与幸福兄弟拼购网联系，联系电话：<font style="font-size: 20px;color: blue">0515-88175689</font>。<br/><br/></span>
	</div></c:if>
	<c:if test='${sessionScope.userinfo.type == "1"||sessionScope.userinfo.type == "0"}'>
		<div id="win" iconCls="icon-save" title="My Window">
			<div id="tt" style="">
			  
			</div>
		</div>
	</c:if>
	<div style="height: 80px;border:0px red solid;"></div>
	<iframe src="index/footer.html" width="970" height="120" frameborder="0" scrolling="no"></iframe>
	</center>
	<a id="openUrl" style="display: none;" href="#" target="_blank"></a>
</body>
<script type="text/javascript">
	var mp = '${sessionScope.userinfo.modulePassword}';
	var userType = '${sessionScope.userinfo.type}';
	var nowTime = '<%=nowTime%>';
	if(userType == '1' || userType == '0'){
		$('#win').window({
			width:900,
			height:400,
			closed:true,
			minimizable:false,
			maximizable:false,
			title:'信息提醒'
		});
		$('#tt').tabs({
			width:899,
			height:375,
			border:false,
			onSelect:function(name){
				if(name == '申请提醒'){
					$("#sqtx").attr("src",$("#sqtx").attr("src"));
				}
				if(name == '拼购申请'){
					$("#pgsq").attr("src",$("#pgsq").attr("src"));
				}
				if(name == '抢购申请'){
					$("#qgsq").attr("src",$("#qgsq").attr("src"));
				}
				if(name == '业主申请'){
					$("#yzsq").attr("src",$("#yzsq").attr("src"));
				}
				if(name == '商家申请'){
					$("#sjsq").attr("src",$("#sjsq").attr("src"));
				}
				if(name == '版主申请'){
					$("#bzsq").attr("src",$("#bzsq").attr("src"));
				}
			}
		});
		loadTip();
		//setTimeout('reflashTip()',1000*60*30);
	}
	
	function loadTip(){
		$('#tt').tabs('close','申请提醒');
		$('#tt').tabs('close','拼购申请');
		$('#tt').tabs('close','抢购申请');
		$('#tt').tabs('close','业主申请');
		$('#tt').tabs('close','商家申请');
		$('#tt').tabs('close','版主申请');
		$.get('loadJoinTip.shtml',function(mes){
			if(parseInt(mes,10) > 0){
				$('#win').window('open');
				$('#tt').tabs('add',{
					title:'申请提醒',
				    content:'<iframe id="sqtx" width="100%" height="100%" src="pinppairecord/pinppairecordTip.jsp" frameBorder="0"/>',
				    closable:false
				});
			}
		})
		$.get('buyrecord/loadpinggourecord.shtml',function(mes){
			if(parseInt(mes,10) > 0){
				$('#win').window('open');
				$('#tt').tabs('add',{
					title:'拼购申请',
				    content:'<iframe id="pgsq" width="100%" height="100%" src="pinggou/pinggourecordlistremind.jsp" frameBorder="0"/>',
				    closable:false
				});
			}
		})
		$.get('tgBrandMember/loadremind.shtml',function(mes){
			if(parseInt(mes,10) > 0){
				$('#win').window('open');
				$('#tt').tabs('add',{
					title:'抢购申请',
				    content:'<iframe id="qgsq" width="100%" height="100%" src="pingqiang/pingqiangrecordremind.jsp" frameBorder="0"/>',
				    closable:false
				});
			}
		})
		$.get('member/member_loadpremind.shtml',function(mes){
			if(parseInt(mes,10) > 0){
				$('#win').window('open');
				$('#tt').tabs('add',{
					title:'业主申请',
				    content:'<iframe id="yzsq" width="100%" height="100%" src="member/memberlistremind.jsp" frameBorder="0"/>',
				    closable:false
				});
			}
		})	
		$.get('brand/loadremind.shtml',function(mes){
			if(parseInt(mes,10) > 0){
				$('#win').window('open');
				$('#tt').tabs('add',{
					title:'商家申请',
				    content:'<iframe id="sjsq" width="100%" height="100%" src="shoper/brandlistremind.jsp" frameBorder="0"/>',
				    closable:false
				});
			}
		})
		$.get('tribuneMaster/tribuneMaster_loadpremind.shtml',function(mes){
			if(parseInt(mes,10) > 0){
				$('#win').window('open');
				$('#tt').tabs('add',{
					title:'版主申请',
				    content:'<iframe id="bzsq" width="100%" height="100%" src="tribune/tribuneMasterremind.jsp" frameBorder="0"/>',
				    closable:false
				});
			}
		})
	
	}
	
	function reflashTip(){
		$.get("tipOnTime.shtml?nowTime="+nowTime,function(mes){
			if(parseInt(mes,10)>0){
				 $.messager.show({
				 title:'提醒',
				 msg:'有新提醒，<a href="javascript:loadTip();">点击查看</a>',
				 showSpeed:1000,
				 height:100,
				 width:250,
				 timeout:1000*60*30
	 		 })
			}
		})
		a();
	}
	
	function a(){
		//setTimeout('reflashTip()',1000*60*30);
	}
</script>
</html>